package com.zyh.scs.admin.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.javers.core.metamodel.annotation.DiffInclude;
import org.javers.core.metamodel.annotation.PropertyName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author hwh
 * @ClassName: 支付管理$
 * @Description: $
 * @Date $
 * @Version 1.0
 */
@Data
@Schema(description = "支付管理表")
@TableName("scsx_payment")
@Accessors(chain = true)
public class UserPayment implements Serializable {

    /**
     * 主键ID
     */
    @TableId(value = "payment_id", type = IdType.AUTO)
    @Schema(description = "主键id")
    private Long paymentId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    @Schema(description = "用户ID")
    private Long userId;

    @TableField("guid")
    @Schema(description = "guid")
    private String guid;

    /**
     * 用户姓名
     */
    @TableField(value = "username")
    @Schema(description = "用户姓名")
    private String username;

    /**
     * 工号
     */
    @TableField("user_job_number")
    @Schema(description = "工号")
    private String userJobNumber;

    /**
     * 手机号
     */
    @DiffInclude
    @PropertyName("手机号")
    @Schema(description = "手机号")
    @Length(min = 11, max = 11, message = "手机号必须为11位")
    private String phone;

    /**
     * 用户类型1内部员工2委外员工3见习员工4充值无管理费人员5委外单位6食堂职工7其他8外部
     */
    @Schema(description = "用户类型1内部员工2委外员工3见习员工4充值无管理费人员5委外单位6食堂职工7其他8外部")
    @TableField("user_type")
    private Integer userType;

    /**
     * 餐卡卡号
     */
    @TableField("user_meals_number")
    @Schema(description = "餐卡卡号")
    private String userMealsNumber;

    /**
     * 交易账户类型 1餐补账户、 2现金
     */
    @Schema(description = "交易账户类型 1餐补账户、 2现金")
    @TableField(value = "account_type")
    private String accountType;

    /**
     * 支付渠道
     */
    @Schema(description = "支付渠道 1满客宝 2京东锦礼 3后台 4地铁好店")
    @TableField(value = "payment_channel")
    private String paymentChannel;

    /**
     * 支付金额
     */
    @Schema(description = "支付金额")
    @TableField(value = "pay_number")
    private BigDecimal payNumber;

    /**
     * 交易时间
     */
    @TableField("transaction_time")
    @Schema(description = "交易时间")
    private LocalDateTime transactionTime;

    /**
     * 流水号
     */
    @TableField("recharge_stream")
    @Schema(description = "流水号")
    private String rechargeStream;

    /**
     * 第三方交易流水号
     */
    @TableField("third_recharge_stream")
    @Schema(description = "第三方交易流水号")
    private String thirdRechargeStream;

    /**
     * 备注
     */
    @TableField("notes")
    @Schema(description = "备注")
    private String notes;

    /**
     * 现金账户金额元
     */
    @Schema(description = "现金账户金额元")
    @TableField("cash_account")
    private BigDecimal cashAccount;

    /**
     * 餐补账户账户金额元
     */
    @Schema(description = "餐补账户账户金额元")
    @TableField("card_account")
    private BigDecimal cardAccount;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 0-正常，1-删除
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "删除标记,1:已删除,0:正常")
    private String delFlag;

    /**
     * 订单号
     */
    @TableField("order_id")
    @Schema(description = "订单号")
    private String orderId;

    /**
     * 第三方订单号
     */
    @TableField("out_order_no")
    @Schema(description = "第三方订单号")
    private String outOrderNo;

}
